Previous page Next page

Support for Cascading Style Sheets

XHTML and Cascading Style Sheets (CSS) are designed to separate content from its presentation. XHTML and WML tags were originally designed to define the content of a document. In this way, the same content can be rendered on diverse devices. Most XHTML elements are semantic elements, that is, they convey meaning about their content rather than information on how to display it. For example, the <em> element contains content that should be emphasized. It is up to the browser to figure out how to render the emphasis, with a different typeface, a louder voice, or in another way. Style sheets are a way to manage a Web page’s overall look such as the page background, background color, or font color.

A style is a rule that tells the browser how to render a particular tag’s contents. Each tag has a number of style properties associated with it, whose values define how that tag is rendered by the browser. A rule defines a specific value for one or more tag properties. Style Sheets allow style information to be specified in many ways. The Web browser supports the inline style where a style attribute and tag along with a list of properties and their values are specified. The browser uses those style properties and values to render the tag’s contents.

The browser supports CSS2. CSS2 is compatible with both WML and XHTML and can be re-used if the browser evolves to XHTML. For more information, see http://www.w3.org/TR/CSS21/cascade.html.


Previous page Next page